/* Align the
label to the left side. We’ll discuss this function and
* others in the
section on Widget Attributes. */
gtk_misc_set_alignment
(GTK_MISC (label), 0, 0);
/* Pack the
label into the vertical box (vbox box1). Remember that
* widgets added
to a vbox will be packed one on top of the other in
* order.
*/
gtk_box_pack_start
(GTK_BOX (box1), label, FALSE, FALSE, 0);
/* Show the
label */
gtk_widget_show
(label);
/* Call our
make box function - homogeneous = FALSE, spacing = 0,
* expand =
FALSE, fill = FALSE, padding = 0 */
box2 = make_box
(FALSE, 0, FALSE, FALSE, 0);
gtk_box_pack_start
(GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show
(box2);
/* Call our
make box function - homogeneous = FALSE, spacing = 0,
* expand =
TRUE, fill = FALSE, padding = 0 */
box2 = make_box
(FALSE, 0, TRUE, FALSE, 0);
gtk_box_pack_start
(GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show
(box2);
/* Args are:
homogeneous, spacing, expand, fill, padding */
box2 = make_box
(FALSE, 0, TRUE, TRUE, 0);
gtk_box_pack_start
(GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show
(box2);
/* Creates a
separator, we’ll learn more about these later,
* but they are
quite simple. */
separator =
gtk_hseparator_new ();
/* Pack the
separator into the vbox. Remember each of these
* widgets is
being packed into a vbox, so they’ll be stacked
* vertically.
*/
gtk_box_pack_start
(GTK_BOX (box1), separator, FALSE, TRUE, 5);
gtk_widget_show
(separator);
/* Create
another new label, and show it. */
label =
gtk_label_new ("gtk_hbox_new (TRUE, 0);");
gtk_misc_set_alignment
(GTK_MISC (label), 0, 0);
gtk_box_pack_start
(GTK_BOX (box1), label, FALSE, FALSE, 0);
gtk_widget_show
(label);
/* Args are:
homogeneous, spacing, expand, fill, padding */
box2 = make_box
(TRUE, 0, TRUE, FALSE, 0);
gtk_box_pack_start
(GTK_BOX (box1), box2, FALSE, FALSE, 0);
gtk_widget_show
(box2);
/* Args are:
homogeneous, spacing, expand, fill, padding */
box2 = make_box
(TRUE, 0, TRUE, TRUE, 0);
gtk_box_pack_start
(GTK_BOX (box1), box2, FALSE, FALSE, 0);